package com.bto.solar.work.entity;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.sql.Timestamp;

/**
 * <p>
 * 订单操作日志表
 * </p>
 *
 * @author adrian
 * @since 2023-08-28
 */
@Getter
@Setter
@Accessors(chain = true)
@TableName("order_operation_log")
@ApiModel(value = "OrderOperationLog对象", description = "订单操作日志表")
public class OrderOperationLog implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty("订单操作日志ID")
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @ApiModelProperty("订单ID")
    private String orderId;

    @ApiModelProperty("订单阶段")
    private String stageId;

    @ApiModelProperty("任务id")
    private String taskId;

    @ApiModelProperty("订单状态")
    private String stateId;

    @ApiModelProperty("操作内容")
    private String operatInfo;

    @ApiModelProperty("审批内容")
    private String approvalInfo;

    @ApiModelProperty("操作方式：NEW 新增、UPDATE更新，其他的复用状态字段")
    private String type;

    @ApiModelProperty("操作人")
    private Long operatUser;

    @ApiModelProperty("备注")
    private String remark;

    @ApiModelProperty("创建时间")
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss")
    @TableField(fill = FieldFill.INSERT)
    private Timestamp createTime;

    @ApiModelProperty("更改时间")
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss")
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private Timestamp updateTime;
}
